<?php
	session_start();	
?>

<?php
	if( $_SESSION["admin"] != "" )
	{
?>
<?php
    include_once("process/user.php");
	$user = new user();
	
	if( $_GET["com"] == "user" && $_GET["func"] == "update" && isset($_GET["id"]))
	{
		$row = $user->GetOneUser($_GET['id']);
         //print_r($row);
         $id = $row['category_id'];
            if($row['status'] == 1)
            {
			     $user->UpdateUser('0', $id);
            }
            else if($row['status'] == 0)
            {
                $user->UpdateUser('1', $id);
            }
         	echo '<meta http-equiv="Refresh" content="0;URL=index.php?com=user" />';
			return;
	}
	else
	{
		echo '<meta http-equiv="Refresh" content="0;URL=index.php?com=user" />';
	}	
	 }
   else
	{
		echo "<meta http-equiv='refresh' content='0; url=login.php' />";
	}
?>
